<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="baidu-site-verification" content="code-UjJKh3jtOo">
  <link rel="stylesheet" href="//unpkg.com/@highlightjs/cdn-assets@11.5.0/styles/atom-one-dark.min.css">
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
  <title>Tit1e</title>
  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2767111597631391" crossorigin="anonymous"></script>
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="Tit1e" type="application/atom+xml">
</head>

<body class="dark">
    <div class="container">
    <header class="header">
  <div class="title">
      <a href="/" class="logo">Tit1e</a>
      <div class="btn-dark"></div>
      <script>
        let bodyClx = document.body.classList;
        let btnDark = document.querySelector('.btn-dark');
        let sysDark = window.matchMedia('(prefers-color-scheme: dark)');
        let darkVal = localStorage.getItem('dark');

        let setDark = (isDark) => {
        bodyClx[isDark ? 'add' : 'remove']('dark');
        localStorage.setItem('dark', isDark ? 'yes' : 'no');
        };

        setDark(darkVal ? darkVal === 'yes' : sysDark.matches);
        requestAnimationFrame(() => bodyClx.remove('not-ready'));

        btnDark.addEventListener('click', () => setDark(!bodyClx.contains('dark')));
        sysDark.addEventListener('change', (event) => setDark(event.matches));
      </script>
  </div>
    <ul class="menu">
        
        
        
        
        <li class="menu-item ">
            <a href="/" class="menu-item-link">Home</a>
        </li>
        
        
        <li class="menu-item ">
            <a href="/archives/" class="menu-item-link">Archives</a>
        </li>
        
        
        <li class="menu-item ">
            <a href="/atom.xml" class="menu-item-link">RSS</a>
        </li>
        
        
        <li class="menu-item ">
            <a target="_blank" rel="noopener" href="https://pixeltimer.art" class="menu-item-link">Pixel Timer</a>
        </li>
        
    </ul>
    <div class="search-box">
        <input type="search" id="search" placeholder="搜索">
    </div>
</header>
    <article class="post">
  <div class="post-meta">
    <span class="post-time">10 / 18, 2017</span>
  </div>
  <div class="post-title">
    <h1 class="title">陋 网</h1>
  </div>
  
  <ul class="post-tags">
    
    <li class="tag-item">
      #学习
    </li>
    
  </ul>
  
  <div class="post-content">
    <h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>前阵子把今年四五月份时候写的陋网重写了. 之前用的是 vue.js, vue-resource 和 jQuery, 现在想想就算是那时候, jQuery也是完全没必要引入的.后来不知道为何网站在 PC 端列表无法渲染了, 原因是 PC 端获取到的 data 编程字符串格式了, 而我之前开发的时候明明是能正常获取的, 而且移动端是能正确渲染列表的, 这个原因我至今没有想明白. </p>
<p>现在会了 vue-cli 之后, 就想着把网站重写了, 做成 SPA 单页应用, 这样才更像个 App.于是就有了这个项目. </p>
<span id="more"></span>
<h3 id="项目地址"><a href="#项目地址" class="headerlink" title="项目地址:"></a>项目地址:</h3><p><a target="_blank" rel="noopener" href="https://github.com/Tit1e/simpleWeb">https://github.com/Tit1e/simpleWeb</a></p>
<h3 id="项目描述"><a href="#项目描述" class="headerlink" title="项目描述"></a>项目描述</h3><ul>
<li>采用 vue-cli 开发</li>
<li>vue-router 进行页面路由控制</li>
<li>采用 sass CSS 预处理, 对网站整体风格进行统一控制</li>
<li>localstorage HTML5本地存储</li>
<li>ThinkPHP 后台框架</li>
<li>前后端分离</li>
</ul>
<h3 id="项目结构"><a href="#项目结构" class="headerlink" title="项目结构"></a>项目结构</h3><ul>
<li><code>/数据库结构.sql</code> - 数据库结构,其实实际只用到了2张表而已</li>
<li><code>/program</code> - vue 项目目录</li>
<li><code>/static</code> - vue 打包后的静态资源目录</li>
<li><code>/Application/Home/View/Index/</code> - 打包后的 index.html 文件目录</li>
</ul>
<p>** 下篇文章将总结开发过程中遇到的问题. ** </p>

  </div>
  <div class="post-near">
    
    <a
      class="post-near-prev"
      href="/p/9b8ba08c.html"
      title="vue-cli 使用记录以及使用过程中遇到的问题总结"
    >
      <span class="arrow">←</span>
      <span class="post-near-title">
        vue-cli 使用记录以及使用过程中遇到的问题总结
      </span>
    </a>
    
    
    <a
      class="post-near-next"
      href="/p/b66cd88a.html"
      title="块级元素靠右的实现方式"
    >
      <span class="post-near-title">
        块级元素靠右的实现方式
      </span>
      <span class="arrow">→</span>
    </a>
    
  </div>
</article>

    <footer class="footer">
  <p>本博客采用 <a class="license-link" rel="license noopener" target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">署名-非商业性使用-相同方式共享 4.0 国际</a>协议进行许可</p>
  <p>
    <span>Thanks For <a target="_blank" rel="noopener" href="https://github.com/nanxiaobei/hugo-paper" taget="_blank">hugo-paper</a></span>
    <span style="margin-left: 10px;">&copy; 2016-2025 by Tit1e</span>
  </p>
</footer>
    </div>
    <script src="//unpkg.com/@highlightjs/cdn-assets@11.5.0/highlight.min.js"></script>
<script>
  hljs.initHighlightingOnLoad();
  var _hmt = _hmt || [];
    (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?6349d3bc54baea0b04a65145c5e3b799";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
    })();
    const block = document.querySelectorAll('.post-content')[0]
    block.addEventListener('click', e => {
        const {nodeName, src} = e.target
        if(nodeName !== 'IMG') return
        document.body.classList.add('overflow-hidden')
        const div = document.createElement('div')
        div.id = 'global-cover'
        div.title = '点击关闭'
        const a = document.createElement('a')
        a.href = src
        a.target="_blank"
        a.title = '点击打开原图'
        const img = document.createElement('img')
        img.className = 'show-pic'
        img.src = src
        a.appendChild(img)
        div.appendChild(a)
        document.body.appendChild(div)
    })
    document.body.addEventListener('click', e => {
        if(e.target.id === 'global-cover'){
            document.body.classList.remove('overflow-hidden')
            document.body.removeChild(e.target)
        }
    })
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-7M04VN3JZ4"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-7M04VN3JZ4');
</script>

<script src="/js/search.js"></script>


</body>
</html>